{% extends 'base.html' %}
{% load widget_tweaks %}

{% block title %}{{ title }} - {{ block.super }}{% endblock %}

{% block content %}
<div class="row">
    <div class="col-md-8 offset-md-2">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0"><i class="bi bi-envelope-plus"></i> 发送通知</h4>
            </div>
            <div class="card-body">
                <form method="post">
                    {% csrf_token %}
                    {% for field in form %}
    <div class="form-group">
        {{ field.label_tag }}
        {{ field|add_class:'form-control' }}
        {% if field.errors %}
            <div class="text-danger">{{ field.errors }}</div>
        {% endif %}
    </div>
{% endfor %}
                    <div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
                        <a href="{% url 'core:notification_list' %}" class="btn btn-secondary me-md-2">取消</a>
                        <button type="submit" class="btn btn-primary">发送通知</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}